#ifndef _ABLOC_H_
# define _ABLOC_H_

# include "Elements\\AElement.h"
# include "Utils\\Rect.h"
# include "Sprite.h"
# include <SDL/SDL.h>
# include <string>

class Bloc : public SDL::ELEMENTS::AElement
{
public:
	static Uint16 const BASIC_LIFE;

protected:
	std::string m_type;
	Uint16 m_life;
	Sprite m_currentSprite;

public:
	Bloc(std::string const& _type, Sprite _currentSprite, Uint16 _life = Bloc::BASIC_LIFE);
	virtual ~Bloc();


	bool Draw(SDL_Surface* _screen);
	void DecreaseLife(Uint16 _value);
	void IncreaseLife(Uint16 _value);
	void SetPosition(Sint16 _x, Sint16 _y);
	void SetPosition(SDL::UTILS::Rect const& _position);
	void Move(Sint16 _offsetX, Sint16 _offsetY);
	void Move(SDL::UTILS::Rect const& _offset);
	void Duplicate(Bloc& _dst) const;

	Uint16 GetLife() const;
	void SetLife(Uint16 _life);
	std::string const& GetType() const;
	Sprite* GetCurrentSprite();
	void SetCurrentSprite(Sprite _currentSprite);
};

#endif // _ABLOC_H_
